package com.eascs.frequency.service.impl;

import org.springframework.cache.annotation.CachePut;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Component;

import com.eascs.app.cache.annotation.NotCacheKey;
import com.eascs.app.log.Logger;
import com.eascs.app.log.LoggerFactory;
import com.eascs.frequency.cache.CacheNames;
import com.eascs.frequency.service.FrequencyDataService;
@Component
public class FrequencyDataServiceImpl implements FrequencyDataService{
	private static final Logger logger = LoggerFactory.getLogger(FrequencyServiceImpl.class);
	//,key="#key+':'+#type+':'+#biz"
	@Override
	@Cacheable(value=CacheNames.FREQUENCY_LIMIT)
	public long get(String key, String type, String biz) {
		logger.info("=============================load data");
		return 0;
	}

	@Override
	@CachePut(value=CacheNames.FREQUENCY_LIMIT)
	public long toZero(String key, String type, String biz) {
		return 0;
	}

	@Override
	@CachePut(value=CacheNames.FREQUENCY_LIMIT)
	public long update(String key, String type, String biz, @NotCacheKey long value) {
		return value;
	}

}
